/* -----------------------------------------------------------------------------
 * PROJECT    : lwf_common
 * FILE       : ColorUtil.java
 *
 * HISTORY:
 * Date          Author                        Description
 * ----------------------------------------------------------------------------- 
 * Mar 15, 2011  mycodetalks			       Created
 */
package net.lwf.color.util;

import net.lwf.common.constant.ICommonConstant;
import net.lwf.number.util.RandomNumberGenerator;

/**
 * Class description goes here
 */
public class ColorUtil {
	
	public static String getColorCode() {
		int colorcode = RandomNumberGenerator.generate(1, ICommonConstant.AVAILABLE_COLORS);
		String color = ICommonConstant.BLACK_COLOR;
		switch(colorcode) {
		    case ICommonConstant.RED:
		    	color = ICommonConstant.RED_COLOR;
		    	break;
		    case ICommonConstant.ORANGE:
		    	color = ICommonConstant.ORANGE_COLOR;
		    	break;
		    case ICommonConstant.BLUE:
		    	color = ICommonConstant.BLUE_COLOR;
		    	break;
		    case ICommonConstant.GREEEN:
		    	color = ICommonConstant.GREEEN_COLOR;
		    	break;
		    case ICommonConstant.YELLOW:
		    	color = ICommonConstant.YELLOW_COLOR;
		    	break;
		    case ICommonConstant.PURPLE:
		    	color = ICommonConstant.PURPLE_COLOR;
		    	break;
		    case ICommonConstant.GREY:
		    	color = ICommonConstant.GREY_COLOR;
		    	break;
		    case ICommonConstant.PINK:
		    	color = ICommonConstant.PINK_COLOR;
		    	break;
		    case ICommonConstant.BROWN:
		    	color = ICommonConstant.BROWN_COLOR;
		    	break;
		    case ICommonConstant.BLACK:
		    	color = ICommonConstant.BLACK_COLOR;
		    	break;
		    default:
		    	color = ICommonConstant.WHITE_COLOR;
		    	break;
		}
		
		return color;
	}

}



